using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SermonEditor
{
    public partial class EditPreferences : Form
    {
        public EditPreferences()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void EditPreferences_Load(object sender, EventArgs e)
        {
            txtPassword.Text = Settings.Password;
            txtUserName.Text = Settings.UserName;
            txtServerName.Text = Settings.FtpServer;
            txtRemoteAudioPath.Text = Settings.remoteAudioPath;
            txtRemoteXmlFile.Text = Settings.remoteXMLFile;
        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {
            
        }

        private void butSave_Click(object sender, EventArgs e)
        {
            Settings.Password = txtPassword.Text;
            Settings.UserName = txtUserName.Text;
            Settings.FtpServer = txtServerName.Text;
            Settings.remoteAudioPath = txtRemoteAudioPath.Text;
            Settings.remoteXMLFile = txtRemoteXmlFile.Text;

            Settings.SaveSettings();
            this.Close();
        }

        private void butCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}